<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/workflow/flowDefin/css/setActor.css" />

<div class="modal-body" id="myflow_actor_setting" >
	<ul class="nav nav-tabs" role="setting_tabs">
	  <li role="presentation" class="active"><a href="#setting_actor" role="tab" data-toggle="tab">执行人设置</a></li>
	  <li role="presentation"><a href="#setting_rule" role="tab" data-toggle="tab">执行规则设置</a></li>
	</ul>
	<div class="tab-content" id="setting_content">
		<div id="setting_actor" role="tabpanel" class="tab-pane active">
			<div class="top">
				<label class="oa_topfont"><input type="radio" name="flag" value="perWay" />&nbsp;&nbsp;按具体人</label>
				<label class="oa_topfont"><input type="radio" name="flag" value="dArWay" />&nbsp;&nbsp;按部门和角色</label>
				<label class="oa_topfont"><input type="radio" name="flag" value="starterWay" />&nbsp;&nbsp;按发起人</label>
				<label class="oa_topfont"><input type="radio" name="flag" value="fromWay" />&nbsp;&nbsp;按提交人</label>
			</div>
			<!-- 按具体人 div-->
			<div id="perDiv" class="treePanel" style="border:solid 1px #ccc; margin-right:4px; ">
				 <div id="tree" class="ztree" style="overflow-y:auto; height:270px;" ></div>
			</div>

			<!-- 按部门和角色 div start-->
			<div id="depAndRoleDiv" class="treePanel" style="overflow-y:auto; height:280px; width:230px; border:solid 1px #ccc; margin-right:10px; float:left; " >
				 <div class="oa_deptTree">选择部门</div>
				 <div id="deptTree" class="ztree" ></div>
			</div>
			<!-- 加号 div-->
			<div id="addCode" style="float:left; margin-top:100px;"><img src="${pageContext.request.contextPath}/workflow/flowDefin/img/add.png"></div>
			<!-- 角色的div -->
			<div id="roleTreeAll" style="border:solid 1px #ccc; display: none; float:right; height:280px; width:235px; margin-right:4px; overflow-y:auto; margin-bottom:5px;" >
			 	<div class="oa_deptTree">选择角色</div>
				<div class="treePanel" style="padding-top:10px;padding-left:20px" id="roleTree" ></div>
			</div>
			<!-- 按部门和角色 div end-->

			<!--按发起人div -->
			<div class="treePanel" id="startPer" style="border:solid 1px #ccc; display: none; height:300px; overflow:hidden;padding:10px;" >
				<p><input type="radio" name="startPer" value="0" checked="checked"/>&nbsp;&nbsp;发起人</p>
				<p><input type="radio" name="startPer" value="1" />&nbsp;&nbsp;发起人部门负责人</p>
				<p><input type="radio" name="startPer" value="2" />&nbsp;&nbsp;发起人上
					<select id="startSel" class="form-control" style="width:50px;display:inline;height:24px;padding:0px 5px">
						<option value="1">一</option>
						<option value="2">二</option>
						<option value="3">三</option>
					</select>级部门负责人
				</p>
				<p><input type="radio" name="startPer" value="3" />&nbsp;&nbsp;发起人本部门其他人</p>
				<p><input type="radio" name="startPer" value="4" />&nbsp;&nbsp;发起人下级部门负责人</p>
				<p>
					<input type="radio" name="startPer" value="5" />&nbsp;&nbsp;发起人部门指定角色
					<button onclick="showRoleTree('startPer',this)" type="button" class="btn btn-sm btn-primary" style="padding:3px 10px">选择</button>
				</p>
				<p>
					<input type="radio" name="startPer" value="6" />&nbsp;&nbsp;发起人&具体人
					<button onclick="showPerTree('startPer',this)" type="button" class="btn btn-sm btn-primary" style="padding:3px 10px">选择</button>
				</p>
			</div>

			<!-- 按提交人div -->
			<div class="treePanel" id="sendPer" style="border:solid 1px #ccc; display: none; height:280px; overflow-y:auto;padding:10px; overflow-x:hidden; margin-right:4px;" >
				<p><input type="radio" name="sendPer" value="1" />&nbsp;&nbsp;提交人部门负责人</p>
				<p>
					<input type="radio" name="sendPer" value="2" />&nbsp;&nbsp;
					提交人上
					<select id="sendSel" class="form-control" style="width:50px;display:inline;height:24px;padding:0px 5px">
						<option value="1">一</option>
						<option value="2">二</option>
						<option value="3">三</option>
					</select>
					级部门负责人
				</p>
				<p><input type="radio" name="sendPer" value="3" />&nbsp;&nbsp;提交人本部门其他人</p>
				<p><input type="radio" name="sendPer" value="4" />&nbsp;&nbsp;提交人下级部门负责人</p>
				<p><input type="radio" name="sendPer" value="5" />&nbsp;&nbsp;提交人下级部门所有人</p>
				<p>
					<input type="radio" name="sendPer" value="6" />&nbsp;&nbsp;
					提交人部门指定角色
					<button onclick="showRoleTree('sendPer',this)" type="button" class="btn btn-sm btn-primary" style="padding:3px 10px">选择</button>
				</p>
			</div>
			<!-- 下部选择信息展示div -->
			<div id="sel" style=" height:80px; overflow-y:auto; clear:both;overflow-x:hidden; margin-top:5px; margin-right: 4px;border:1px solid #ccc; clear:both;">
				<input id="sel_data" name="sel_data"  value="" type="hidden"/>
				<input id="sel_type" name="sel_type"  value="" type="hidden"/>
				<input id="role_checked" name="role_checked"  value="" type="hidden"/>

				<input id="per_selected_startPer" name="per_selected_startPer"  value="" type="hidden"/>

				<input id="role_checked_startPer" name="role_checked_startPer"  value="" type="hidden"/>
				<input id="role_checked_sendPer" name="role_checked_sendPer"  value="" type="hidden"/>

				<div id="msg_title_per" style="color:#325a98;">选择的人员：</div>
				<div id="msg_content_per" ></div>
				<div id="msg_title_dep" style="color:#325a98;">选择的部门：</div>
				<div id="msg_content_dep" ></div>
				<div id="msg_Roletitle" style="color:#325a98;">选择的角色：</div>
				<div id="msg_Rolecontent"></div>
				<!-- 按发起人选择角色 -->
				<div id="msg_Roletitle_startPer" style="color:#325a98;">选择的角色：</div>
				<div id="msg_Rolecontent_startPer"></div>
				<!-- 按发起人选择人员 -->
				<div id="msg_Pertitle_startPer" style="color:#325a98;">选择的人员：</div>
				<div id="msg_Percontent_startPer"></div>
				<!-- 按提交人选择角色 -->
				<div id="msg_Roletitle_sendPer" style="color:#325a98;">选择的角色：</div>
				<div id="msg_Rolecontent_sendPer"></div>
			</div>

			<div class="oa_ajtr">
				<a id="actionerSub" class="btn btn-sm btn-primary">确定</a>
			</div>
		</div>
	  	<div id="setting_rule" role="tabpanel" class="tab-pane">
			<table cellpadding="0" cellspacing="0" border="0" width="99%" class="oa_zxgz">
				<tr>
					<td>
						<p>请选择给本环节选择实际执行人的环节:</p>
						<div id="activities"></div>
					</td>
				</tr>
				<tr>
					<td>
						<p>执行时在备选人中人数限制:</p>
						<input type="radio" name="ifOnlyOne" value="1" /> &nbsp;只选一人&nbsp;&nbsp;
						<input type="radio" name="ifOnlyOne" value="0" /> &nbsp;至少指定
						<input type="button" value="+" onclick="addPerNum();"/>
						<input id="rulePerNum" name="rulePerNum" type="text" value="1" style="width:20px;" readonly="readonly"/>
						<input type="button" value="-" onclick="delPerNum();"/>人处理
					</td>
				</tr>
				<tr>
					<td>
						<p>多人处理规则：</p>
						<input name="moreDeal" type="radio" checked="checked" value="concurrence"/> &nbsp;并行 &nbsp;&nbsp; <input name="moreDeal" type="radio" value="unique"/> &nbsp;只能一人处理 &nbsp;&nbsp;<input name="moreDeal" type="radio" value="sequence"/> &nbsp;顺序
					</td>
				</tr>
			</table>
			<div class="oa_ajtr" >
				<button id="ruleSub" type="button" class="btn btn-sm btn-primary">确定</button>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript" src="${pageContext.request.contextPath}/workflow/flowDefin/js/setActor.js"></script>
